/**
 * 
 */
package com.maxin.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.maxin.entity.Orderbasetable;

/**
 * @author: maxin
 * @description: 
 */
public interface OrderbasetableMapper {
	@Insert("insert into orderbasetable(amount, status) values(#{amount}, #{status})")
	int insert(Orderbasetable orderbasetable);
	
	@Delete("delete from orderbasetable where id = #{id}")
	int deleteById(long id);
	
	@Delete("delete from orderbasetable where busertable_id = #{busertable_id}")
	int deleteByUserId(long id);
	
	@Update("update orderbasetable set amount = #{amount}, status = #{status} where id = #{id}")
	int updateById(Orderbasetable orderbasetable);
	
	@Update("update orderbasetable set amount = #{amount}, status = #{status} where busertable_id = #{busertable_id}")
	int updateByUserId(Orderbasetable orderbasetable);
	
	@Select("select * from orderbasetable where id = #{id}")
	Orderbasetable selectById(String id);
	
	@Select("select * from orderbasetable")
	List<Orderbasetable> selectAll();
	
	@Select("select * from orderbasetable limit #{pageIndex}, #{pageSize}")
	List<Orderbasetable> selectByPage(int pageIndex, int pageSize);
}
